﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterALSafa.Master" AutoEventWireup="true"
    CodeBehind="TE_Question_Categories.aspx.cs" Inherits="School.Pages.Teaching.TE_Question_Categories" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table dir="rtl" style="width: 100%; float: right">
        <tr>
            <td>
                <table align="right" dir="rtl" style="width: 100%; float: right">
                    <tr>
                        <td colspan="2" class="admintitle" align="center">
                            ادخال بيانات
                        </td>
                    </tr>
                    <tr>
                        <td nowrap="nowrap">
                            اسم&nbsp; التصنيف
                        </td>
                        <td>
                            <asp:TextBox ID="txtname" runat="server" Width="150px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtname"
                                Display="Dynamic" ErrorMessage="*" ForeColor="Red" ValidationGroup="st"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td nowrap="nowrap">
                            &nbsp;
                        </td>
                        <td>
                            <asp:Button ID="btnSave" runat="server" CssClass="graybutton" Text="اضافة" OnClick="btnSave_Click" />
                            &nbsp;
                            <asp:Label ID="lbltst" runat="server" Visible="False"></asp:Label>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:GridView ID="gvQues_Cat" runat="server" AllowPaging="True" AlternatingRowStyle-CssClass="GridItemAltername"
                    AutoGenerateColumns="False" CssClass="Grid" DataKeyNames="Id" FooterStyle-CssClass="GridHeaderFooter"
                    HeaderStyle-CssClass="GridHeaderFooter" PagerStyle-CssClass="GridPager" OnPageIndexChanging="gvQues_Cat_PageIndexChanging"
                    OnRowCancelingEdit="gvQues_Cat_RowCancelingEdit" OnRowDataBound="gvQues_Cat_RowDataBound"
                    OnRowDeleting="gvQues_Cat_RowDeleting" OnRowEditing="gvQues_Cat_RowEditing" OnRowUpdating="gvQues_Cat_RowUpdating"
                    Width="80%">
                    <AlternatingRowStyle CssClass="GridItemAltername" />
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                م
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Container.DataItemIndex + 1 %>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="التصنيف" SortExpression="TypeName">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtCat" runat="server" Text='<%# Bind("TypeName") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtCat"
                                    Display="Dynamic" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("TypeName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField CancelText="إلغاء" EditText="تعديل" ShowEditButton="True" UpdateText="تحــديث" />
                        <asp:TemplateField ShowHeader="False">
                            <ItemTemplate>
                                <asp:LinkButton ID="lkdelete" runat="server" CausesValidation="False" CommandName="Delete"
                                    Text="حذف"></asp:LinkButton>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle CssClass="GridHeaderFooter" />
                    <HeaderStyle CssClass="GridHeaderFooter" />
                    <PagerStyle CssClass="GridPager" />
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
